The standard specifies:
{ vector<int> v; ... // populate v ... deque<int> d(v.begin(), v.end()); }
This implies this declaration:
template <class T, class Allocator = allocator<T> >class deque { .... public: template<class InputIterator> deque( InputIterator first, InputIterator last, const Allocator& alloc = Allocator()); .... }
Work-arounds:
{ vector<int> v; ... // populate v ... deque<int> d; copy(v.begin(), v.end(), d.begin()); // Don't copy(v.begin(), v.end(), inserter(d, d.begin())); // OK }